<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" />
<link href="css/adminstyle.css" rel="stylesheet" type="text/css"><script  language="javascript" type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<title>管理区域</title></head><body>
<div style="background-color:#FFFFFF ">
  <table width="300" border="0" align="center"  cellpadding="3" cellspacing="1" class="tableborder">		<tr>		<td colspan="2" align="center">&nbsp;		<input type="hidden" name="id" id="id" value="<?=$id?>">		</td>		</tr>
        <tr  bgcolor="#FFFFFF" >	      <td  class="header">验证码</td>	      <td><input type="text" name="sms_code" id="sms_code" value="<?=$sms_code?>" size="30"></td>        </tr>        <tr  bgcolor="#FFFFFF">	      <td  class="header">验证状态</td>	      <td>	      <select name="real_phone" id="real_phone">	      	<?=$sms_verify_options?>	      </select>	      </td>        </tr>        <tr  bgcolor="#FFFFFF">          <td colspan="2" align="center">          </td>        </tr>        <tr  bgcolor="#FFFFFF">          <td colspan="2" align="center">          <input type="button" class="PublicBot" name="retry_button" id="retry_button" value="重新发送验证码">          <input type="button" class="PublicBot" name="save_button" id="save_button" value="保存并关闭" >          </td>        </tr>
  </table>
</div><script>var retry_send = new Object();var save_send = new Object();$("#retry_button").click(function(){	var retry_sms_code = getRandom(1000,9999);	var id = $("#id").val();	$("#sms_code").attr("value",retry_sms_code);	var postJsondata ={"id":id,"code":retry_sms_code};	$.ajax({		 type:'POST',		 url:'user_sendCode.html',		 data:postJsondata,		 dataType: 'json',		 success:retry_send.response,		 async:false		});})$("#save_button").click(function(){	var id = $("#id").val();	var sms_code= $("#sms_code").val();	var real_phone = $("#real_phone").val();	var postJsondata ={"id":id,"code":sms_code,"real_phone":real_phone};	$.ajax({		 type:'POST',		 url:'user_saveSmsCode.html',		 data:postJsondata,		 dataType: 'json',		 success:save_send.response,		 async:false	 });})retry_send.response= function(res){	if(res.success=='success'){		alert('发送成功,请注意查收');	}else{		alert('发送失败');	}}save_send.response= function(res){	if(res.success=='success'){		alert('更新成功');		window.close();	}}function getRandom(n){return Math.floor(Math.random()*n+1)}function getRandom(bound1, bound2) {    return Math.floor(Math.random() * (bound2 - bound1));}</script></body>
</html>
